using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

using miciv;

namespace micivCore.Faction
{
    public class FactionGroup
    {
        protected Faction m_faction;
        public Faction Faction
        {
            get
            {
                return this.m_faction;
            }
        }

        protected string m_strID;
        public string ID
        {
            get
            {
                return this.m_strID;
            }
        }

        protected Hashtable m_htblEntityPrototypes;
        public IEnumerator EntityPrototypes
        {
            get
            {
                return this.m_htblEntityPrototypes.GetEnumerator();
            }
        }

        public int Count
        {
            get
            {
                return this.m_htblEntityPrototypes.Count;
            }
        }

        public FactionGroup(Faction _faction, string _id)
        {
            this.m_faction = _faction;
            this.m_strID = _id;
            this.m_htblEntityPrototypes = new Hashtable();
        }

        public void AddEntityPrototype(EntityPrototype _prototype)
        {
            if (false == this.m_htblEntityPrototypes.ContainsKey(_prototype.Name))
            {
                this.m_htblEntityPrototypes.Add(_prototype.Name, _prototype);
            }
        }
    }
}
